/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SportsTotalGradeRule extends BasicModel<SportsTotalGradeRule> {
  ruleId?: string; // 主键
  scoreSymbol?: string; // 分值符号
  score1?: string; // 分值1
  score2?: string; // 分值2
  totalGrade?: string; // 总分等级
  isDelete?: string; // 删除标记
}

export const sportsTotalGradeRuleList = (params?: SportsTotalGradeRule | any) =>
  defHttp.get<SportsTotalGradeRule>({ url: adminPath + '/sports/sportsTotalGradeRule/list', params });

export const sportsTotalGradeRuleListData = (params?: SportsTotalGradeRule | any) =>
  defHttp.post<Page<SportsTotalGradeRule>>({ url: adminPath + '/sports/sportsTotalGradeRule/listData', params });

export const sportsTotalGradeRuleForm = (params?: SportsTotalGradeRule | any) =>
  defHttp.get<SportsTotalGradeRule>({ url: adminPath + '/sports/sportsTotalGradeRule/form', params });

export const sportsTotalGradeRuleSave = (params?: any, data?: SportsTotalGradeRule | any) =>
  defHttp.postJson<SportsTotalGradeRule>({ url: adminPath + '/sports/sportsTotalGradeRule/save', params, data });

export const sportsTotalGradeRuleDelete = (params?: SportsTotalGradeRule | any) =>
  defHttp.get<SportsTotalGradeRule>({ url: adminPath + '/sports/sportsTotalGradeRule/delete', params });
